package mytrain.kirayous.controller;


import mytrain.kirayous.entity.User;
import mytrain.kirayous.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author KiraYous
 * @since 2021-06-17
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    UserMapper userMapper;

    @GetMapping("/test")
    String test(){

        return "test";
    }
    @GetMapping("/get")
    List<User> get()
    {
        return userMapper.selectList(null);
    }
}

